-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Submodules with simpler APIs to Pp_ast #537
Conversation
7575f10
to
f5e1eab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me.
Is there any benefit to doing this the Ast_builder
way fully by extracting the type interface and using a 'a with_loc
and 'a without_location
type (except for with and without a config
) ?
Yes that sounds like a good idea! I'll factor out the pretty-printer type! I'll go ahead and make the test suite 5.3 compatible first though! |
f5e1eab
to
1385740
Compare
I pushed the changes with the new alias types. I didn't go for |
Signed-off-by: Nathan Rebours <[email protected]>
Signed-off-by: Nathan Rebours <[email protected]>
1385740
to
9129e81
Compare
@NathanReb did you mean to reply to #338 ? (your comment makes more sense to me in the context of this other issue) |
Indeed! My bad, I'll move the message! |
This adds a functor and a
Default
module, similar to what's done inAst_builder
. One can use the functor to get pre-configured formatters or use the formatters provided by theDefault
module which are preconfigured with the default configuration.This provides modules whose pretty printers can be used directly with
"%a"
format strings as they don't expect an optional argument first.